package cn.stard.basic.util;

import lombok.Data;

@Data
public class AjaxResult {
    private Boolean success= true;
    private  String message= "成功";
    private Object resultObj;
    /* 定义一个静态方法 返回值为本身 这是单例*/
    public   static AjaxResult me(){
       return new AjaxResult();
    }

    public AjaxResult setSuccess(Boolean success){
        this.success=success;

        return this;
    }

    public AjaxResult setMessage(String message){
        this.message=message;

        return this;
    }

    // 自定义的set方法
    public AjaxResult setResultObj(Object resultObj) {
        this.resultObj = resultObj;
        return this;
    }
}
